package cn.ztf.zshop.sys.dao;


import cn.ztf.zshop.sys.po.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserDao extends BaseMapper<SysUser> {

    /**
     * 创建用户和角色的关联表
     * @param roleIds
     */
    void createSysUserRole(@Param("list") List<Long> roleIds,@Param("userId") Long userId);

    void deleteSysUserRole(Long userId);

    List<Long> findUserIdByRoleId(Long roleId);

    List<String> findPermissionByRoleId(String roleId);

}
